aboutsummaryrefslogtreecommitdiff
path: root/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshot...
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-09-28 15:13:55 +0100
committerMichael Williamson <mike@zwobble.org>2023-09-28 15:13:55 +0100
commit37623ba6964acf573e100903fbdd1453d69d2e26 (patch)
treed7dd087153dc64cdf3f386b4897a3255d64db453 /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
parenta637fcc83f642d5320608ea7fc20a93f3ec5ab86 (diff)
Add Patio code gen for struct field accesses
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected49
1 files changed, 49 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
new file mode 100644
index 00000000..c7b77936
--- /dev/null
+++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected
@@ -0,0 +1,49 @@
+Compilation unit elements:
+
+(
+ function
+ "shed__function__User__0"
+ visibility=private
+ locals=((param "closurePointer__0" data-ptr) (param "local__isActive" int) (param "local__name" int) (val "structValuePointer__0" data-ptr) (val "structValue__0" int))
+ return-type=int
+ body=(
+ (alloc-heap (local "structValuePointer__0") (struct (int int)))
+ (
+ memory-store
+ pointer=(local "structValuePointer__0")
+ layout=(struct (int int))
+ offset=(0)
+ value=(local "local__name")
+ )
+ (
+ memory-store
+ pointer=(local "structValuePointer__0")
+ layout=(struct (int int))
+ offset=(1)
+ value=(local "local__isActive")
+ )
+ (data-ptr-to-int (local "structValue__0") (local "structValuePointer__0"))
+ (return (local "structValue__0"))
+ )
+)
+
+Locals:
+ * (val "structType__User__0" int)
+ * (val "closurePointer__User__0" data-ptr)
+
+Instructions:
+
+(
+ (alloc-heap (local "closurePointer__User__0") (struct (function-ptr (struct ()))))
+ (
+ memory-store
+ pointer=(local "closurePointer__User__0")
+ layout=(struct (function-ptr (struct ())))
+ offset=(0)
+ value=(function-ptr "shed__function__User__0")
+ )
+ (data-ptr-to-int (local "structType__User__0") (local "closurePointer__User__0"))
+)
+
+Temporary stack:
+ * structType__User__0